<?php

namespace Catalog;

use Doctrine\ORM\Mapping as ORM;

/**
 * Catalog\PdfImage
 *
 * @ORM\Table(name="pdf_image")
 * @ORM\Entity
 */
class PdfImage
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string $url
     *
     * @ORM\Column(name="url", type="string", length=255, nullable=false)
     */
    private $url;

    /**
     * @var Catalog\PdfFile
     *
     * @ORM\ManyToOne(targetEntity="Catalog\PdfFile")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="file_id", referencedColumnName="id")
     * })
     */
    private $file;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set url
     *
     * @param string $url
     * @return PdfImage
     */
    public function setUrl($url)
    {
        $this->url = $url;
        return $this;
    }

    /**
     * Get url
     *
     * @return string 
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * Set file
     *
     * @param Catalog\PdfFile $file
     * @return PdfImage
     */
    public function setFile(\Catalog\PdfFile $file = null)
    {
        $this->file = $file;
        return $this;
    }

    /**
     * Get file
     *
     * @return Catalog\PdfFile 
     */
    public function getFile()
    {
        return $this->file;
    }
}